package w14;

public class s03 {

	public static boolean isMing7(int n) {
		while(n>0) {
			int y=n%10;
			if(y==7)return true;
			n/=10;
		}
		return false;
	  
	}
	public static boolean isAn7(int n) {
		return n%7==0;
	}
	public static void main(String[] args) {
		for(int n=1;n<70;++n) {
			if(isMing7(n)||isAn7(n))System.out.printf("%d",n);
		}
	}

}
